package com.service.impl;

import com.bean.hht.Stainfo;
import com.bean.ydq.Interviewer;
import com.mapper.ydq.LoginMapper;
import com.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService {
    @Autowired LoginMapper loginMapper;
    @Override
    public Interviewer userLogin(String account, String password) {
        Interviewer interviewer = loginMapper.getInterviewer(account,password);
        return interviewer;
    }

    @Override
    public String saveInfo(Stainfo stainfo) {
        try {
            loginMapper.saveInfo(stainfo);
            return "保存成功";
        }catch (Exception e){
            return "保存失败"+e;
        }

    }
}
